<template>
  <basic-container>
    <avue-crud :option="option"
               :table-loading="loading"
               :data="dataList"
               :page.sync="page"
               :permission="permissionList"
               :before-open="beforeOpen"
               v-model="form"
               ref="crud"
               @row-update="rowUpdate"
               @row-save="rowSave"
               @row-del="rowDel"
               @search-change="searchChange"
               @search-reset="searchReset"
               @selection-change="selectionChange"
               @current-change="currentChange"
               @size-change="sizeChange"
               @refresh-change="refreshChange"
               @on-load="onLoad">
    </avue-crud>

  </basic-container>
</template>



<script>

import {getPage, getDetail, saveOrUpdate, remove} from "@/api/prison/cabinetuser";
import  option  from "./option";
import {mixins} from '@/mixins/crud'
import {mapGetters} from "vuex";

export default {
  mixins: [mixins],
  data() {
    return {
      loading: true,
      option: option,
      dataList: [],
      events: {
        remove: remove,
        update: saveOrUpdate,
        add: saveOrUpdate,
        getDetail: getDetail,
        getList: getPage,
      },
    };
  },

  computed: {
    ...mapGetters(["userInfo", "permission"]),
    permissionList() {
      return {
        // addBtn: this.vaildData(this.permission.xxx_add,false),
        // viewBtn: this.vaildData(this.permission.xxx_view,false),
        // delBtn: this.vaildData(this.permission.xxx_delete,false),
        // editBtn: this.vaildData(this.permission.xxx_edit,false)
      };
    },
  },

  methods: {


  }
};
</script>

<style>
</style>
